import request from '@/utils/request.js'

/**
 * @author: yuCloud
 * @desc: 登录 ，获取token
 * @params: 用户名 ，用户密码
 * @type:
 * @time: 2023-03-30 21:51:50
 **/
export const login = (data) => {
    return request({
        method: 'post',
        url: '/users/login',
        data,
        mock: true
    })
}

/**
 * @author: yuCloud
 * @desc: 获取用户信息
 * @params:
 * @type:
 * @time: 2023-04-04 11:07:17
 **/
export const getUsersInfo = () => {
    return request({
        method: 'get',
        url: '/users/info',
        mock: true
    })
}

/**
 * @author: yuCloud
 * @desc: 退出登录
 * @params:
 * @type:
 * @time: 2023-04-04 11:24:51
 **/

export const logout = () => {
    return request({
        method: 'get',
        url: '/logout',
        mock: true
    })
}
